<div class="row-fluid">
    <div class="table-header">
        Danh sách phiếu nhập
        <div class="pull-right">
            <a class="btn btn-small btn-success" href='<?php echo site_url("/receipt/create/$warehouseId")?>'>Thêm <i class="icon-arrow-right icon-on-right bigger-110"></i></a>
        </div>
    </div>
    <table id="table_report" class="table table-striped table-bordered table-hover dataTable">
        <thead>
            <tr>
                <th>Mã</th>
                <th>Ngày</th>
                <th>Ghi chú</th>
                <th>Chi tiết</th>
            </tr>
        </thead>
        <tbody>
                  <?php foreach ($lstReceipt as $r) { ?>
                     <tr>
                        <td><?php echo $r->Id ?></td>
                        <td>
                            <?php echo $r->Date ?>
                        </td>
                        <td>
                           <?php echo $r->Note ?>                   
                        </td>                        
                        <td>
                            <a href='<?php echo site_url("/receipt/list_product/$r->Id") ?>'>Chi tiết</a>

                           <a href='<?php echo site_url("/receipt/check/$warehouseId") ?>'>
                              <button class="btn btn-mini btn-danger">
                                 Thủ kho <i class="icon-check bigger-120"></i>
                              </button>
                           </a>

                        </td>
                     </tr>
                  <?php } ?>

        </tbody>

    </table>
</div>

    <script src='<?php echo base_url("/content/js/jquery.dataTables.min.js") ?>'></script>
    <script src='<?php echo base_url("/content/js/jquery.dataTables.bootstrap.js") ?>'></script>

    <script>
        $(document).ready(function () {

            var oTable = $('#table_report').dataTable({
                "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>"
            });

            oTable.fnSort([[0, 'desc']]);

        });
    </script>
